Method for encoding/decoding image and device for same

ABSTRACT

Disclosed in the present invention are a method for encoding/decoding an image and a device for same. Particularly, a method for decoding an image may comprise the steps of: parsing the weight value (w) of a loop filter from a bitstream outputted from an encoder; applying the loop filter to an image obtained by using a prediction signal and a differential signal; and generating a recovered image and a reference image by performing the weighted sum of the recovered image before the loop filter is applied and the recovered image after the loop filter is applied, based on the w.

TECHNICAL FIELD

The present invention relates to a method for processing video and, moreparticularly, to an encoding/decoding method using a method for applyinga weighting parameter-based loop filtering to a image decoding-completedimage, and a device supporting the same.

BACKGROUND ART

A compression encoding means a series of signal processing techniquesfor transmitting digitized information through a communication line ortechniques for storing the information in a form that is proper for astorage medium. The media including a picture, an image, an audio, andthe like may be the target for the compression encoding, andparticularly, the technique of performing the compression encodingtargeted to the picture is referred to as a video image compression.

The next generation video contents are supposed to have thecharacteristics of high spatial resolution, high frame rate and highdimensionality of scene representation. In order to process suchcontents, drastic increase of memory storage, memory access rate andprocessing power will be resulted.

Accordingly, it is required to design the coding tool for processing thenext generation video contents efficiently.

DISCLOSURE Technical Problem

An aspect of the present invention provides an encoding/decoding methodusing a method for applying a weighting parameter-based loop filteringto a image decoding-completed image.

Another aspect of the present invention provides a method for deriving aweighting parameter.

An aspect of the present invention provides a method for generating areconstructed image and/or a reference image on the basis of a weightingparameter.

Technical subjects obtainable from the present invention are non-limitedby the above-mentioned technical task. And, other unmentioned technicaltasks can be clearly understood from the following description by thosehaving ordinary skill in the technical field to which the presentinvention pertains.

Technical Solution

According to an aspect of the present invention, there is provided amethod for decoding an image, including: parsing a weight value (w) of aloop filter from a bit stream output from an encoder; applying the loopfilter to an image obtained using a predicted signal and a residualsignal; and generating a reconstructed image and a reference image byperforming (or finding) the weighted sum of the reconstructed imagebefore the loop filter is applied and the reconstructed image after theloop filter is applied, on the basis of the w.

In an aspect of the present invention, there is provided a device fordecoding an image, including: an entropy-decoding unit parsing a weightvalue (w) of a loop filter from a bit stream output from an encoder; afiltering applying unit applying the loop filter to an image obtainedusing a predicted signal and a residual signal; and a reconstructedimage and reference image generating unit generating a reconstructedimage and a reference image by performing (or finding) the weighted sumof the reconstructed image before the loop filter is applied and thereconstructed image after the loop filter is applied, on the basis ofthe w.

Preferably, 1-w may be applied to the reconstructed image before theloop filter is applied and w is applied to the reconstructed image afterthe loop filter is applied and added to generate the reconstructedimage.

Preferably, w may be applied to the reconstructed image before the loopfilter is applied and 1-w is applied to the reconstructed image afterthe loop filter is applied and added to generate the reconstructedimage.

Preferably, the method may further include: parsing a flag indicatingwhether the w is used from the bit stream, wherein when it is indicatedby the flag that w is used, the reconstructed image and the referenceimage may be generated on the basis of the w.

Preferably, when it is indicated by the flag that the w is not used,loop filtering may be performed respectively to generate thereconstructed image and the reference image.

Preferably, when a predetermined image is referred to by M number ofimages, only M−1 number of weight values regarding M−1 number of imagesamong the M number of images may be transmitted through the bit stream,and a weight value regarding an image for which a weight value was nottransmitted, among the M number of images, may be determined on thebasis of the M−1 number of weight values.

Preferably, the loop filter may be applied after one or more of adeblocking filter and a sample adaptive offset (SAO) are applied to animage obtained using the predicted signal and the residual signal.

Preferably, a value for minimizing an error between an image generatedby performing (or finding) the weighted sum of an original image as acurrent encoding target and an original image as a next encoding targeton the basis of the w and a reconstructed image regarding the originalimage as the current encoding target may be determined.

Advantageous Effects

According to an embodiment of the present invention, image quality of acurrently decoded image may be enhanced by applying a weightingparameter-based loop filtering to an image decoding-completed image.

According to an embodiment of the present invention, since weightingparameter-based loop filtering is applied to an image decoding-completedimage, image quality of a reference image referred to by images decodedthereafter may be enhanced to enhance accuracy of reference.

According to an embodiment of the present invention, since accuracy ofreference is enhanced, accuracy of prediction may be increased toresultantly increase compression efficiency.

The technical effects of the present invention are not limited to thetechnical effects described above, and other technical effects notmentioned herein may be understood to those skilled in the art from thedescription below.

DESCRIPTION OF DRAWINGS

The accompanying drawings, which are included herein as a part of thedescription for help understanding the present invention, provideembodiments of the present invention, and describe the technicalfeatures of the present invention with the description below.

FIG. 1 is a block diagram of an encoder encoding a still image or avideo signal according to an embodiment to which the present inventionis applied.

FIG. 2 is a block diagram of a decoder decoding a still image or a videosignal according to an embodiment to which the present invention isapplied.

FIG. 3 is a view illustrating a structure of dividing a coding unitwhich may be applied to the present invention.

FIG. 4 is a view illustrating a prediction unit which may be applied tothe present invention.

FIG. 5 illustrates a decoder including both an adaptive loop filter andan adaptive filter according to an embodiment of the present invention.

FIG. 6 illustrates a decoder including a weighting parameter-based loopfilter according to an embodiment of the present invention.

FIG. 7 is a view illustrating an image decoding method according to anembodiment of the present invention.

FIG. 8 is a block diagram of a decoding device according to anembodiment of the present invention.

FIG. 9 illustrates an encoding device according to an embodiment of thepresent invention.

BEST MODES

Hereinafter, a preferred embodiment of the present invention will bedescribed by reference to the accompanying drawings. The descriptionthat will be described below with the accompanying drawings is todescribe exemplary embodiments of the present invention, and is notintended to describe the only embodiment in which the present inventionmay be implemented. The description below includes particular details inorder to provide perfect understanding of the present invention.However, it is understood that the present invention may be embodiedwithout the particular details to those skilled in the art

In some cases, in order to prevent the technical concept of the presentinvention from being unclear, structures or devices which are publiclyknown may be omitted, or may be depicted as a block diagram centering onthe core functions of the structures or the devices

Further, although general terms widely used currently are selected asthe terms in the present invention as much as possible, a term that isarbitrarily selected by the applicant is used in a specific case. Sincethe meaning of the term will be clearly described in the correspondingpart of the description in such a case, it is understood that thepresent invention will not be simply interpreted by the terms only usedin the description of the present invention, but the meaning of theterms should be figured out

Specific terminologies used in the description below may be provided tohelp the understanding of the present invention. And, the specificterminology may be modified into other forms within the scope of thetechnical concept of the present invention. For example, a signal, data,a sample, a picture, a frame, a block, etc may be properly replaced andinterpreted in each coding process.

Hereinafter, in the present disclosure, ‘block’ or ‘unit’ refers to aunit on which a process of encoding/decoding such as prediction,transform, and/or quantization is performed, and may be configured as amulti-dimensional array of a sample (or picture element or pixel).

‘Block’ or ‘unit’ may refer to a multi-dimensional array of samplesregarding a luma component or a multi-dimensional array of samplesregarding a chroma component. Also, both the multi-dimensional arrayregarding the luma component and the multi-dimensional array regardingthe chroma component may be generally called ‘block’ or ‘unit’.

For example, ‘block’ or ‘unit’ may be interpreted as having a meaningincluding all of a coding block (CB) which refers to an array of samplesto be encoded/decoded, a coding tree block (CTB) including a pluralityof coding blocks, a prediction block (PB) (or a prediction unit (PU))which refers to an array of samples to which the same prediction isapplied, and a transform block (TB) (or a transform unit (TU)) whichrefer to an array of samples to which the same transform is applied.

Also, in this disclosure, unless otherwise mentioned, ‘block’ or ‘unit’may be interpreted to have a meaning including a syntax structure usedin the process of encoding/decoding an array of samples regarding a lumacomponent and/or chroma component. Here, the syntax structure refers tozero or more of syntax elements present within a bit stream in aspecific order, and the syntax element refers to an element of dataexpressed within a bit stream.

For example, ‘block’ or ‘unit’ may be interpreted as having a meaningincluding all of a coding unit (CU) including a coding block (CB) and asyntax structure used for encoding the corresponding coding block, acoding tree unit (CTU) including a plurality of coding units, aprediction unit (PU) including a prediction block (PB) and a syntaxstructure used for predicting the corresponding prediction block (PB), atransform unit (TU) including a transform block (TB) and a syntaxstructure used for transforming the corresponding transform block (TB).

Also, in this disclosure, ‘block’ or ‘unit’ is not limited to an arrayof square or rectangular samples (or picture elements or pixels) and mayrefer to an array of samples (or picture elements or pixels) having apolygonal shape with three or more vertices. In this case, ‘block’ or‘unit’ may be called a polygon block or polygon unit.

FIG. 1 is a block diagram of an encoder encoding a still image or videoaccording to an embodiment to which the present invention is applied.

Referring to FIG. 1, an encoder 100 may include a picture partitioningunit 110, a subtract unit 115, a transform unit 120, a quantization unit130, a dequantization unit 140, an inverse transform unit 150, afiltering unit 160, a decoded picture buffer (DPB) 170, a predictionunit 180 and an entropy encoding unit 190. And the prediction unit 180may include an inter-prediction unit 181 and an intra-prediction unit182.

The image segmentation unit 110 may segment an input video signal (orpicture or frame) input to the encoder 100 into one or more blocks.

The subtract unit 115 may subtract a predicted signal (or predictedblock) output from the prediction unit 180 (i.e., the inter-predictionunit 181 or the intra-prediction unit 182), from the input video signalto generate a residual signal (or a residual block). The generatedresidual signal (or residual block) is transmitted to the transform unit120.

The transform unit 120 applies a transform method (e.g., discrete cosinetransform (DCT), discrete sine transform (DST), graph-based transform(GBT), Karhunen-Loeve transform (KLT), etc.) to generate a transformcoefficient. Here, the transform unit 120 may perform transformationusing a transform method determined according to a prediction modeapplied to the residual block and a size of the residual block togenerate transform coefficients.

The quantization unit 130 quantizes the transform coefficient andtransmits it to the entropy encoding unit 190, and the entropy encodingunit 190 performs an entropy coding operation of the quantized signaland outputs it as a bit stream.

Meanwhile, the quantized signal that is outputted from the quantizationunit 130 may be used for generating a prediction signal. For example, byapplying dequatization and inverse transformation to the quantizedsignal through the dequantization unit 140 and the inverse transformunit 150, the residual signal may be reconstructed. By adding thereconstructed residual signal to the prediction signal that is outputtedfrom the inter-prediction unit 181 or the intra-prediction unit 182, areconstructed signal (or a reconstructed block) may be generated.

On the other hand, during such a compression process, adjacent blocksare quantized by different quantization parameters from each other, andaccordingly, an artifact in which block boundaries are shown may occur.Such a phenomenon is referred to blocking artifact, which is one of theimportant factors for evaluating image quality. In order to decreasesuch an artifact, a filtering process may be performed. Through such afiltering process, the blocking artifact is removed and the error forthe current picture is decreased at the same time, thereby the imagequality being improved

The filtering unit 160 applies filtering to the reconstructed signal,and outputs it through a play-back device or transmits it to the decodedpicture buffer 170. The filtered signal transmitted to the decodedpicture buffer 170 may be used as a reference picture in theinter-prediction unit 181. As such, by using the filtered picture as areference picture in an inter-picture prediction mode, the encoding rateas well as the image quality may be improved

The decoded picture buffer 170 may store the filtered picture in orderto use it as a reference picture in the inter-prediction unit 181

The inter-prediction unit 181 performs a temporal prediction and/or aspatial prediction by referencing the reconstructed picture in order toremove a temporal redundancy and/or a spatial redundancy.

Here, since the reference picture used for performing a prediction is atransformed signal that goes through the quantization or thedequantization by a unit of block when being encoded/decoded previously,there may exist blocking artifact or ringing artifact

Accordingly, in order to solve the performance degradation owing to thediscontinuity of such a signal or the quantization, by applying a lowpass filter to the inter-prediction unit 181, the signals between pixelsmay be interpolated by a unit of sub-pixel. Herein, the sub-pixel meansa virtual pixel that is generated by applying an interpolation filter,and an integer pixel means an actual pixel that is existed in thereconstructed picture. As a method of interpolation, a linearinterpolation, a bi-linear interpolation, a wiener filter, and the likemay be applied

The interpolation filter may be applied to the reconstructed picture,and may improve the accuracy of prediction. For example, theinter-prediction unit 181 may perform prediction by generating aninterpolation pixel by applying the interpolation filter to the integerpixel, and by using the interpolated block that includes interpolatedpixels.

The intra-prediction unit 182 predicts a current block with reference tosamples around a block to be currently encoded. The intra-predictionunit 182 may perform the following process to perform intra-prediction.First, the intra-prediction unit 182 may prepare a reference samplerequired for generating a predicted signal. Also, the intra-predictionunit 182 may generate a predicted signal (predicted block) using theprepared reference sample. Thereafter, a prediction mode is encoded.Here, the reference sample may be prepared through reference samplepadding and/or reference sample filtering. Since the reference samplehas undergone a prediction and reconstructing process, it may have aquantization error. Thus, in order to reduce such an error, a referencesample filtering process may be performed on each prediction mode usedfor intra-prediction.

The predicted signal (or predicted block) generated through theinter-prediction unit 181 or the intra-prediction unit 182 may be usedto generate a reconstructed signal (or reconstructed block) or aresidual signal (or residual block).

FIG. 2 is a schematic block diagram of a decoder decoding a still imageor a video signal according to an embodiment to which the presentinvention is applied.

Referring to FIG. 2, a decoder 200 may include an entropy decoding unit210, a dequantization unit 220, an inverse transform unit 230, an addunit 235, a filtering unit 240, a decoded picture buffer (DPB) 250 and aprediction unit 260. And the prediction unit 260 may include aninter-prediction unit 261 and an intra-prediction unit 262

And, the reconstructed video signal outputted through the decoder 200may be played through a play-back device

The decoder 200 receives the signal (i.e., bit stream) outputted fromthe encoder 100 shown in FIG. 1, and the entropy decoding unit 210performs an entropy decoding operation of the received signal

The dequantization unit 220 acquires a transform coefficient from theentropy-decoded signal using quantization step size information.

The inverse-transform unit 230 inverse-transforms the transformcoefficient by applying an inverse-transform technique to obtain aresidual signal (or residual block).

The adder 235 adds the obtained residual signal (or residual block) tothe predicted signal (or predicted block) output from theinter-prediction unit 261 or the intra-prediction unit 262 to generate areconstructed signal (or reconstructed block).

The filtering unit 240 applies filtering to the reconstructed signal (orreconstructed block) and outputs the filtered signal to a reproducingdevice (or player) or transmits the same to the DPB 250. The filteredsignal transmitted to the DPB 250 may be used as reference picture inthe inter-prediction unit 261.

In this specification, the embodiments described in the filtering unit160, the inter-prediction unit 181 and the intra-prediction unit 182 ofthe encoder 100 may also be applied to the filtering unit 240, theinter-prediction unit 261 and the intra-prediction unit 262 of thedecoder, respectively, in the same way.

Block Dividing Structure

Generally, the block-based image compression method is used in thecompression technique (e.g., HEVC) of a still image or a video. Theblock-based image compression method is a method of processing an imageby partitioning it into a specific block unit, and may decrease the useof memory and the amount of operation

FIG. 3 is a diagram for describing a partition structure of a codingunit that may be applied to the present invention

An encoder partitions a single image (or picture) in a coding tree unit(CTU) of a rectangle shape, and encodes the CTU sequentially one by oneaccording to a raster scan order

In the HEVC, a size of CTU may be determined by one of 64×64, 32×32 and16×16. The encoder may select and use the size of CTU according to theresolution of input image or the characteristics of input image. The CTUincludes a coding tree block (CTB) for a luma component and the CTB fortwo chroma components that correspond to it.

One CTU may be partitioned into a quad tree structure. That is, one CTUmay be partitioned into four units each having a square shape and havinga half horizontal size and a half vertical size, generating coding units(CUs). Dividing the quad tree structure may be recursively performed.That is, a CU is hierarchically segmented to a quad tree structure fromone CTU.

The CU means a basic unit of processing process of an input image, forexample, the coding in which the intra/inter prediction is performed.The CU includes a coding block (CB) for a luma component and the CB fortwo chroma components that correspond to it. In the HEVC, a size of CUmay be determined by one of 64×64, 32×32, 16×16 and 8×8.

Referring to FIG. 3, a root node of a quad tree relates to a CTU. Thequad tree is partitioned until it reaches a leaf node, and the leaf nodecorresponds to a CU.

In detail, a CTU corresponds to a root node and has a smallest depthvalue (i.e., depth=0). The CTU may not be partitioned depending oncharacteristics of an input image, and in this case, the CTU correspondsto a CU.

The CTU may be partitioned into a quad tree form, and as a result, lowernodes having a depth of 1 (depth=1) are generated. A node (i.e., a leafnode) which is not partitioned any further from the lower node having adepth of 1 corresponds to a CU. For example, in FIG. 3(b), CU(a), CU(b),and CU(j) have been once partitioned from a CTU and have a depth of 1.

At least any one of the nodes having the depth of 1 may be partitionedinto a quad tree form again, and as a result, lower nodes having a depthof 2 (i.e., depth=2) are generated. Also, a node (i.e., leaf node) whichcannot be partitioned into any further from the lower node having adepth of 2 corresponds to a CU. For example, in FIG. 3(b), CU(c), CU(h),and CU(i) corresponding to nodes c, h, and i have been partitioned twiceand have a depth of 2.

Also, at least any one of the nodes having the depth of 2 may bepartitioned again into a quad tree form, and as a result, lower nodeshaving a depth of 3 (i.e., depth=3) are generated. Also, a node (i.e.,leaf node) which cannot be divided any further from the lower nodehaving the depth of 3 corresponds to a CU. For example, in FIG. 3(b),CU(d), CU(e), CU(f), and CU(g) corresponding to d, e, f, and g have beenpartitioned three times from the CTU and have a depth of 3.

In an encoder, the maximum size or the minimum size of a CU may bedetermined according to the characteristics of a video image (e.g.,resolution) or by considering encoding rate. And, the information forthis or the information that may derive this may be included in a bitstream. The CU that has the maximum size is referred to as a largestcoding unit (LCU), and the CU that has the minimum size is referred toas a smallest coding unit (SCU).

In addition, the CU that has a tree structure may be hierarchicallypartitioned with predetermined maximum depth information (or maximumlevel information). And, each partitioned CU may have the depthinformation. Since the depth information represents a partitioned countand/or degree of a CU, the depth information may include the informationof a size of CU.

Since the LCU is partitioned in a Quad-tree shape, the size of SCU maybe obtained by using a size of LCU and the maximum depth information.Or, inversely, the size of LCU may be obtained by using a size of SCUand the maximum depth information of the tree.

For a single CU, the information (e.g., a partition CU flag (split cuflag)) that represents whether the corresponding CU is partitioned maybe forwarded to a decoder. This partition mode is included in all CUsexcept the SCU. For example, when the value of the flag that representswhether to partition is ‘1’, the corresponding CU is further partitionedinto four CUs, and when the value of the flag that represents whether topartition is ‘0’, the corresponding CU is not partitioned any more, andthe processing process for the corresponding CU may be performed.

As described above, the CU is a basic unit of the coding in which theintra-prediction or the inter-prediction is performed. The HEVCpartitions the CU in a prediction unit (PU) for coding an input imagemore effectively.

The PU is a basic unit for generating a prediction block, and even in asingle CU, the prediction block may be generated in different way by aunit of PU. However, the intra-prediction and the inter-prediction arenot used together for the PUs that belong to a single CU, and the PUsthat belong to a single CU are coded by the same prediction method(i.e., the intra-prediction or the inter-prediction).

The PU is not partitioned in the Quad-tree structure, but is partitionedonce in a single CU in a predetermined shape. This will be described byreference to the drawing below.

FIG. 4 is a diagram for describing a prediction unit that may be appliedto the present invention.

A PU is differently partitioned depending on whether theintra-prediction mode is used or the inter-prediction mode is used asthe coding mode of the CU to which the PU belongs.

FIG. 4(a) illustrates a PU of the case that the intra-prediction mode isused, and FIG. 4(b) illustrates a PU of the case that theinter-prediction mode is used.

Referring to FIG. 4(a), assuming the case that the size of a single CUis 2N×2N (N=4, 8, 16 and 32), a single CU may be partitioned into twotypes (i.e., 2N×2N or N×N).

Here, in the case that a single CU is partitioned into the PU of 2N×2Nshape, it means that only one PU is existed in a single CU.

On the other hand, in the case that a single CU is partitioned into thePU of N×N shape, a single CU is partitioned into four PUs, and differentprediction blocks are generated for each PU unit. However, such a PUpartition may be performed only in the case that the size of CB for theluma component of CU is the minimum size (i.e., the case that a CU is anSCU).

Referring to FIG. 4(b), assuming the case that the size of a single CUis 2N×2N (N=4, 8, 16 and 32), a single CU may be partitioned into eightPU types (i.e., 2N×2N, N×N, 2N×N, N×2N, nL×2N, nR×2N, 2N×nU and 2N×Nd.

Similar to the intra-prediction, the PU partition of N×N shape may beperformed only in the case that the size of CB for the luma component ofCU is the minimum size (i.e., the case that a CU is an SCU)

The inter-prediction supports the PU partition in the shape of 2N×N thatis partitioned in a horizontal direction and in the shape of N×2N thatis partitioned in a vertical direction

In addition, the inter-prediction supports the PU partition in the shapeof nL×2N, nR×2N, 2N×nU and 2N×nD, which is an asymmetric motionpartition (AMP). Here, ‘n’ means ¼ value of 2N. However, the AMP may notbe used in the case that the CU to which the PU is belonged is the CU ofminimum size.

In order to encode the input image in a single CTU efficiently, theoptimal partition structure of the coding unit (CU), the prediction unit(PU) and the transform unit (TU) may be determined based on a minimumrate-distortion value through the processing process as follows. Forexample, as for the optimal CU partition process in a 64×64 CTU, therate-distortion cost may be calculated through the partition processfrom the CU of 64×64 size to the CU of 8×8 size. The detailed process isas follows.

1) The optimal partition structure of PU and TU that generates theminimum rate distortion value is determined through performing theinter/intra-prediction, the transformation/quantization, thedequantization/inverse transformation and the entropy encoding for theCU of 64×64 size.

2) The optimal partition structure of PU and TU is determined topartition the 64×64 CU into four CUs of 32×32 size and to generate theminimum rate distortion value for each 32×32 CU.

3) The optimal partition structure of PU and TU is determined to furtherpartition the 32×32 CU into four CUs of 16×16 size and to generate theminimum rate distortion value for each 16×16 CU.

4) The optimal partition structure of PU and TU is determined to furtherpartition the 16×16 CU into four CUs of 8×8 size and to generate theminimum rate distortion value for each 8×8 CU.

5) The optimal partition structure of CU in the 16×16 block isdetermined by comparing the rate-distortion value of the 16×16 CU thatis obtained in the process of 3) above with the addition of therate-distortion value of the four 8×8 CUs that is obtained in theprocess of 4) above. This process is also performed for remaining three16×16 CUs in the same manner.

6) The optimal partition structure of CU in the 32×32 block isdetermined by comparing the rate-distortion value of the 32×32 CU thatis obtained in the process of 2) above with the addition of therate-distortion value of the four 16×16 CUs that is obtained in theprocess of 5) above. This process is also performed for remaining three32×32 CUs in the same manner.

7) Lastly, the optimal partition structure of CU in the 64×64 block isdetermined by comparing the rate-distortion value of the 64×64 CU thatis obtained in the process of 1) above with the addition of therate-distortion value of the four 32×32 CUs that is obtained in theprocess of 6) above.

In the intra-prediction mode, a prediction mode is selected in units ofPU, and prediction and reconstruction are actually carried out on theselected prediction mode in units of TU.

The TU refers to a basic unit by which actual prediction andreconstruction are carried out. The TU includes a transform block (TB)regarding a luma component and a TB regarding two chroma componentscorresponding thereto.

In the foregoing example of FIG. 3, like one CTU is partitioned into aQT structure to generate CUs, a TU is hierarchically partitioned into aQT structure from one CU.

Since the TU is partitioned to a QT structure, the TU partitioned from aCU may be partitioned into smaller TUs again. In HEVC, a size of a TUmay be determined to any one of 32×32, 16×16, 8×8, and 4×4.

Referring back to FIG. 3, it is assumed that a root node of a QT isrelated to a CU. A QT is partitioned until it reaches a leaf node, andthe leaf node corresponds to a TU.

In detail, a CU corresponds to a root node and has a smallest depth(i.e., depth=0). The CU may not be partitioned according tocharacteristics of an input image, and in this case, the CU correspondsto a TU.

The CU may be partitioned to a QT form, and as a result, lower nodeshaving a depth of 1 (depth=1) are generated. Among the lower nodeshaving the depth of 1, a node which is not partitioned any further(i.e., a leaf node) corresponds to a TU. For example, in FIG. 3(b),TU(a), TU(b), and TU(j) respectively corresponding to a, b, and j havebeen once partitioned from a CU and have a depth of 1.

At least any one of nodes having the depth of 1 may also be partitionedto a QT form, and as a result, lower nodes having a depth of 2 (i.e.,depth=2) are generated. Among the lower nodes having the depth of 2, anode which is not partitioned any further (i.e., a lead node)corresponds to a TU. For example, in FIG. 3(b), TU(c), TU(h), and TU(i)respectively corresponding to c, h, and I have been partitioned twicefrom a CU and have the depth of 2.

Also, at least one of nodes having the depth of 2 may be partitionedagain to a QT form, and as a result, lower nodes having a depth of 3(i.e., depth=3) are generated. Among the lower nodes having the depth of3, a node which is not partitioned any further (i.e., a leaf node)corresponds to a CU. For example, in FIG. 3(b), TU(d), TU(e), TU(f), andTU(g) respectively corresponding to nodes d, e, f, and g have beenpartitioned three times and have the depth of 3.

The TU having a tree structure may be hierarchically partitioned withpredetermined largest depth information (or largest level information).Also, each of the partitioned TUs may have depth information. Sincedepth information represents the number by which the TU has beenpartitioned and/or a degree to which the TU has been divided, the depthinformation may include information regarding a size of the TU.

Regarding one TU, information (e.g., a split TU flag(split_tranform_flag) representing whether the corresponding TU ispartitioned may be delivered to the decoder. The split information isincluded in every TU except for a TU having a smallest size. Forexample, if the value of the flag representing partition is ‘1’, thecorresponding TU is partitioned again into four TUs, while if the flagrepresenting partition is ‘0’, the corresponding CU is not partitionedany further.

Encoding/Decoding Method Using Weighting Parameter-Based Loop Filtering

FIG. 5 illustrates a decoder including both an adaptive loop filter andan adaptive filter according to an embodiment of the present invention.

Referring to FIG. 5, the decoder may include an entropy-decoding unit510, an inverse-quantization unit/inverse-transform unit 520, an adder525, a deblocking filter 530, a sample adaptive offset (SAO) filter 540,an adaptive loop filter (ALF) 550, a decoding picture buffer 560, anadaptive filter (AF) 570, an intra-prediction unit 580, and aninter-prediction unit 590.

The entropy-decoding unit 510 entropy-decodes a signal (i.e., bitstream) output from an encoder.

The inverse-quantization unit/inverse-transform unit 520 obtains atransform coefficient from the entropy-decoded signal using quantizationstep size information and inverse-transforms the transform coefficientby applying an inverse-transform technique to obtain a residual signal(or a residual block).

In FIG. 5, a case in which an inverse-quantization unit and aninverse-transform unit are integrated is illustrated, but theinverse-quantization unit and the inverse-transform unit may beconfigured as separate components as illustrated in FIG. 2.

The adder 525 adds the obtained residual signal (or residual block) to apredicted signal (or predicted block) output from the prediction unit(i.e., the inter-prediction unit 590 or the intra-prediction unit 580)to generate a reconstructed signal (or a reconstructed block).

The embodiments described above in the inter-prediction unit 151 and theintra-prediction unit 182 of the encoder 100 of FIG. 1 may also beapplied to the inter-prediction unit 590 and the intra-prediction unit580 of the decoder in the same manner.

The deblocking filter 530 applies deblocking filtering to thereconstructed signal (or reconstructed image).

The SAO filter 540 applies SAO filtering by adding SAO to the deblockingfiltering-applied reconstructed signal (or reconstructed image) bypixels.

The ALF 550 is a filter applied to the image to which the SAO filter hasbeen applied, which is used to minimize an error with an original image.

In FIG. 5, a case in which the deblocking filter 530, the SAO filter540, and the ALF 550 are separately configured is illustrated, but thedeblocking filter 530, the SAO filter 540, and the ALF 550 may beimplemented as a single filtering unit as illustrated in FIG. 2.

The DPB 560 may store filtered picture such that the filter picture maybe used as reference picture in the inter-prediction unit 181.

The AF 570 is a filter applied to the image stored in the DPB 560, andmay increase prediction performance when the image is used as areference picture of a next frame (or picture). Here, the next frame (orpicture) refers to a frame (or picture) as a decoding target in a nextturn of a current frame (or picture) in a decoding order. Here, thedecoding order may refer to an order of a syntax element processedaccording to a decoding process.

The ALF 550 and the AF 570 are filters for minimizing an error betweentwo input images and have similar characteristics.

The ALF 550 minimizes an error between the original image (O_t) as acurrent (t time point) decoding target and the reconstructed image (R_t)(e.g., an image generated by adding a predicted signal and a residualsignal) as expressed by Equation 1 below. Here, the reconstructed image(R_t) is a reconstructed image regarding the original image (O_t) as acurrent decoding target.

Thus, the encoder obtains a filter (or filter factor) f minimizing anerror function E in Equation 1 below and transmits the obtained filter(or filter factor) f to the decoder.

$\begin{matrix}{E = {\sum\limits_{x,y}\; \left( {{O_{t}\left( {x,y} \right)} - {\sum\limits_{i,{j = {{{- M}/2} - 1}}}^{M/2}\; \left( {{f\left( {i,j} \right)} \times {R_{t}\left( {{x + i},{y + j}} \right)}} \right)}} \right)^{2}}} & \left\lbrack {{Equation}\mspace{14mu} 1} \right\rbrack\end{matrix}$

In Equation 1 (x, y) indicates a horizontal coordinate and a verticalcoordinate of a pixel, and M indicates a size of the filter.

The AF 570 minimizes an error between the original image (O_t+1) as adecoding target and the reconstructed image (R_t) (e.g., image generatedby adding a predicted signal and a residual signal) at a next time (t+1time point) as expressed by Equation 2 below. Here, the reconstructedimage (R_t) indicates a reconstructed image regarding the original image(O_t) as a current (t time point) decoding target.

Thus, the encoder obtains a filter (or a filter factor) minimizing anerror function E and transmits the same to the decoder.

$\begin{matrix}{E = {\sum\limits_{x,y}\; \left( {{O_{t + 1}\left( {x,y} \right)} - {\sum\limits_{i,{j = {{{- M}/2} - 1}}}^{M/2}\; \left( {{f\left( {i,j} \right)} \times {R_{t}\left( {{x + i},{y + j}} \right)}} \right)}} \right)^{2}}} & \left\lbrack {{Equation}\mspace{14mu} 2} \right\rbrack\end{matrix}$

In Equation 2, (x, y) indicates a horizontal coordinate and a verticalcoordinate of a pixel to which the AF is applied, and M indicates a sizeof a filter.

In order to solve a problem in which filter application for increasingimage quality of the reconstructed image and filter application forincreasing image quality of the reference image are repeatedly used, thepresent invention proposes a method for applying a weightingparameter-based loop filter. Through single loop filtering, both anenhanced reconstructed image and a reference image may be obtained.

According to the present invention, by inducing the reconstructed imageand the reference image to the weighting sum of the image before theloop filter is applied thereto and the image to which the loop filter isapplied based on the weighting parameter, image quality of the referenceimage for the original image as a next decoding target, while increasingimage quality of the reconstructed image, may be enhanced.

Hereinafter, in the description of the present invention, a loop filtermay be designated as an in-loop filter and refer to a filter appliedwithin the encoding/decoding process.

Also, for the purposes of description, picture, frame, and the like willgenerally be designated as an image.

FIG. 6 illustrates a decoder including a weighting parameter-based loopfilter according to an embodiment of the present invention.

Referring to FIG. 6, the decoder may include an entropy-decoding unit610, an inverse-quantization unit/inverse-transform unit 620, a firstadder 625, a deblocking filter 630, a sample adaptive offset (SAO)filter 640, an ALF 650, a second adder 655, a DPB 660, a third adder665, an infra-prediction unit 580, and an inter-prediction unit 690.

The entropy-decoding unit 610 entropy-decodes a signal (i.e., bitstream) output from the encoder.

The inverse-quantization unit/inverse-transform unit 620 obtains atransform coefficient from the entropy-decoded signal using quantizationstep size information, and inverse-transforms a transform coefficient byapplying an inverse-transform technique to obtain a residual signal (orresidual block).

In FIG. 6, it is illustrated that the inverse-quantization unit and aninverse-transform unit are configured together, but theinverse-quantization unit and an inverse-transform unit may beseparately configured as illustrated in FIG. 2.

The first adder 625 adds an obtained residual signal (or residual block)to a predicted signal (or predicted block) output from the predictionunit (i.e., the inter-prediction unit 690 or the intra-prediction unit680) to generate a reconstructed signal (or reconstructed block).

The embodiments described in the inter-prediction unit 181 and theintra-prediction unit 182 of the encoder 100 may be applied to theinter-prediction unit 690 and the intra-prediction unit 680 of thedecoder in the same manner.

The deblocking filter 630 applies deblocking filtering to thereconstructed signal (or reconstructed image).

The SAO filter 640 applies SAO filtering by adding SAO to the deblockingfiltering-applied reconstructed signal (or reconstructed image) bypixels.

The ALF 650 is a loop filter applied to the image to which the SAOfilter has been applied, which is used to minimize an error with theoriginal image.

In FIG. 6, the ALF is illustrated as a loop filter, but the presentinvention is not limited thereto and the present invention may beapplied in the same manner using any other available loop filter thanthe ALF.

Also, in FIG. 6, it is illustrated that the deblocking filter 630, theSAO filter 640, and the ALF 650 are separately configured, but thedeblocking filter 630, the SAO filter 640, and the ALF 650 may beimplemented as a single filtering unit as illustrated in FIG. 2 above.

The decoding device according to the present invention may find theweighted sum of an image before the loop filter is applied and the imageafter the loop filter is applied on the basis of a weighting parametervalue parsed from a bit stream output from the encoder to generate oneor more of the reconstructed image and the reference image. This will bedescribed in detail hereinafter.

The second adder 655 adds the image to which a weighting parameterw-applied ALF is applied and the image before a weighting parameter(1-w)-applied ALF is applied, to generate a final reconstructed image.

The third adder 665 adds the image to which a weighting parameterw-applied ALF is applied and the image before a weighting parameter(1-w)-applied ALF is applied, to generate a final reference image.

The DPB 660 may store the reconstructed image signal in order toreproduce the reconstructed image signal through a reproducing device,and/or store the reference image generated by the third adder 665 inorder to use it as a reference image in the inter-prediction unit 181.

As illustrated in FIG. 6, the decoder may induce the reconstructed imageand/or the reference image using the weighting parameter w transmittedfrom the encoder. This will be described in detail as follows.

The reconstructed image (A) as expressed by Equation 3 below may begenerated.

Hereinafter, in order to distinguish the reconstructed image generatedby applying the weighting parameter-based loop filter from thereconstructed image generated by the first adder 625, the imagegenerated by the first adder 625 (i.e., the reconstructed imagegenerated by adding the predicted signal and the residual signal) willbe referred to as an ‘image obtained using the predicted signal and theresidual signal’.

{circumflex over (R)} _(t)=(1−w)×R _(t) +w×R′ _(t)  [Equation 3]

In Equation 3, R_t indicates an image before the loop filter is applied,and R′_t indicates an image after the loop filter is applied.

Here, the image before the loop filter is applied may refer to an imageobtained using the predicted signal and the residual signal or may referto an image to which one or more of the deblocking filter and the SAOfilter are applied.

Referring to Equation 3, the weighting parameter w is applied to theimage (R′_t) after the loop filter is applied and the weightingparameter (1-w) is applied to the image (R_t) before the loop filter isapplied, and thereafter, the both images may be added to obtain thereconstructed image ({circumflex over (R)}_(t)). That is, thereconstructed image may be generated by adding the image before the1−w-applied loop filter is applied and the image after the w-appliedloop filter is applied.

Also, the reference image (P_t+1) may be generated as expressed byEquation 4 below.

P _(t+1) =w×R _(t)+(1−w)×R  [Equation 4]

In equation 4, R_t refers to an image before the loop filter is applied,and R′_t refers to an image after the loop filter is applied.

Referring to FIG. 4, the weighting parameter (1−w) is applied to theimage (R′ t) after the loop filter is applied and the weightingparameter w is applied to the image (R_t) before the loop filter isapplied, and thereafter, the both images may be added to obtain thereference image (P_t+1). That is, the reconstructed image may begenerated by adding the image before the w-applied loop filter isapplied and the image after the 1−w-applied loop filter is applied.

By generating the reconstructed image and/or the reference image, thecase in which the weighting parameter w is 1 may obtain the same resultas that of the case in which the ALF is applied for the reconstructedimage in FIG. 5, and the case in which w is 0 may obtain the same resultas that of the case in which the AF is applied for the reference imagein FIG. 5.

FIG. 7 is a view illustrating an image decoding method according to anembodiment of the present invention.

Referring to FIG. 7, the decoder applies a loop filter to an imageobtained using the predicted signal and the residual signal (S701).

That is, the decoder may apply the loop filter using a loop filterfactor received from the encoder. In this case, although not shown inFIG. 7, an operation of parsing (or deriving) the loop filter factor maybe performed before step S701.

Also, the decoder may apply the loop filter to an image to which one ormore of the deblocking filter and SAO has been applied.

Here, as an example of the loop filter, the ALF illustrated in FIG. 6may be applied, and in addition, a loop filter widely known in anexisting video codec may also be used.

The decoder derives (or parses) a weighting parameter (S702)>

That is, the decoder may decode (or derive or parse) a weighting valuerequired for generating a reconstructed image and/or a reference imagefrom a bit stream output from the encoder using the images before/afterthe loop filter is applied.

Meanwhile, in FIG. 7, the procedure in which step S702 is performedafter step S701 for the purposes of description, but the presentinvention is not limited thereto and step S702 may be performed beforestep S701.

Hereinafter, step S702 will be described in detail.

Table 1 illustrates a slice (segment) header syntax according to anembodiment of the present invention.

Here, a slice header refers to a slice segment header of an independentslice segment, and the independent slice segment may refer to a currentslice segment or the latest independent slice segment ahead of acurrently dependent slice segment according to a decoding order.

TABLE 1 Descriptor slice_segment_header( ) { . . . weight_lf_enable_flague(v) if (weight_lf_enable_flag) weight_lf_idx ue(v) . . .

Referring to Table 1, an LF weight enable flag (‘weight_lf_enable_flag’)syntax element is a flag indicating whether to use a weighting parameteraccording to the present invention. That is, the decoder may parse theflag (e.g., weight_lf_enable_flag) indicating whether to use a weightvalue from a bit stream output from the encoder.

For example, when the weight_lf_enable_flag value is 1 (that is, it isindicated by the flag that the weighting parameter is used), areconstructed image and/or a reference image may be generated on thebasis of the weighting parameter according to the present invention(please refer to FIG. 6 above), and when the weight_lf_enable_flag valueis 0 (that is, it is indicated by the flag that the weighting parameteris not used), filtering for each of the reconstructed image and thereference image may be performed respectively (please refer to FIG. 5above).

The LF weight value index (weight_lf_idx) syntax element indicates aweighting parameter according to the present invention.

For example, referring to the weighting parameter value according to thepresent invention, a certain real number value between 0 and 1 may beused as a weight value. Here, the encoder may transmit a value obtainedby integerizing a weighting parameter value having a certain numbervalue between 0 and 1 to the decoder through weight_lf_idx.

Or, the weight_lf_idx syntax element may indicate a quantized index ofthe weighting parameter according to the present invention. Table 1illustrates a case in which the weight_lf_idx syntax element istransmitted in a form of a quantized index.

For example, as the weighting parameter value according to the presentinvention, a real number value between 0 and 1 may be quantized to aspecific N number of values and transmitted in the form of an index. Forexample, in case where a quantization rate is 0.2, the encoder mayquantize a real number value between 0 and 1 to five quantizationsections such as 0≤w≤0.2 (representative value 0), 0.2≤w≤0.4(representative value 0.2), 0.4≤w≤0.6 (representative value 0.4),0.6≤w≤0.8 (representative value 0.6), 0.8≤w≤1 (representative value 0.8)and transmit the five representative values or indices respectivelyindicating the sections to the decoder through weight_lf_idx.

Also, a table regarding a weighting parameter known by both the encoderand the decoder may be predefined, and the encoder may select theweighting parameter within the table and subsequently transmit an indexindicating the selected weighting parameter to the decoder throughweight_If_idx.

Also, in case where a predetermined image is referred to by M number ofimages, only M−1 number of weight values regarding M−1 number of imagesamong the M number of images may be transmitted through a bit stream,and a weight value for an image to which a weight value was nottransmitted, among the M number of images, may be determined on thebasis of the M−1 number of weight values.

For example, in case where a current image is referred to by M number ofI mages in the future (that is, in case where the current image is usedas a reference image regarding the M number of images in the future), amaximum of (M−1) number of weighting parameters may be transmitted fromthe encoder to the decoder. Here, one non-transmitted weight value maybe induced on the basis of a condition in which the sum of the entireweight values is 1.

In the decoding method according to the present invention, on the basisof the weighting parameter value parsed from the bit stream output fromthe encoder, the image before the loop filter is applied and the imageafter the loop filter is applied may be found to have the weighted sumto generate one or more of a reconstructed image and a reference image.This will be described in detail.

On the basis of the weighting parameter induced in step S702, thedecoder applies the weight value 1−w to the image before the loop filteris applied and applies the weight value w to the image after the loopfilter is applied, and adds the both images to generate a reconstructedimage (S703).

That is, the decoder may generate the reconstructed image using Equation3 above.

On the basis of the weighting parameter induced in step S702, thedecoder applies the weight value w to the image before the loop filteris applied and applies the weight value 1−w to the image after the loopfilter is applied, and adds the both images to generate a referenceimage (S704).

That is, the decoder may generate the reference image using Equation 4above.

FIG. 8 is a block diagram of a decoding device according to anembodiment of the present invention.

Referring to FIG. 8, the decoder implements the functions, processes,and/or methods proposed in FIGS. 5 to 7 above. In detail, the decodermay include an entropy-decoding unit 801 and a filtering unit 802, andthe filtering unit 802 may include a filtering applying unit 803, areconstructed image generating unit 804, and a reference imagegenerating unit 805.

The components of the decoder illustrated in FIG. 8 are merelyillustrative and some of the components of the decoder illustrated inFIG. 8 may be included in other components so as to be implementedtogether, any one component may be separate according to functions so asto be implemented, and any other component not illustrated in FIG. 8 maybe added.

Meanwhile, in FIG. 8, a case in which the reconstructed image generatingunit 804 and the reference image generating unit 805 are included in thefiltering unit 802 is illustrated, but the reconstructed imagegenerating unit 804 and the reference image generating unit 805 may beconfigured to be separated from the filtering unit 802 as illustrated inFIG. 6.

Also, the reconstructed image generating unit 804 and the referenceimage generating unit 805 may be configured as a single reconstructedimage and reference image generating unit.

Also, the filtering unit 802 may further include the deblocking filterand the SAO filter as illustrated in FIGS. 5 and 6.

The entropy-decoding unit 801 derives (or parses) a weighting parameter.

That is, the entropy-decoding unit 801 may decode (or derive or parse) aweight value required for generating a reconstructed image and areference image from a bit stream output from the encoder using theimages before/after the loop filter is applied.

As illustrated in Table 1, the LF weighting index (weight_lf_idx) syntaxelement may be used to transmit the weighting parameter. Also, asdescribed above, referring to the weighting parameter value, forexample, a certain real number value between 0 and 1 may be used as aweight value, and a real number value between 0 and 1 may be quantizedto a specific N number of values and transmitted in the form of anindex.

Also, in case where a current image is referred to by M number of Images in the future (that is, in case where the current image is used asa reference image regarding the M number of images in the future), amaximum of (M−1) number of weighting parameters may be transmitted fromthe encoder to the decoder.

Also, the entropy-decoding unit 801 may further derive (or parse) a flag(e.g., ‘weight_lf_enable_flag’) indicating whether to use the weightingparameter according to the present invention.

The filtering applying unit 803 applies a loop filter to an imageobtained using a predicted signal and a residual signal.

That is, the filtering applying unit 803 may apply the loop filter usinga loop filter factor received from the encoder. Here, theentropy-decoding unit 801 may parse (or derive) the loop filter factor.

Also, the filtering applying unit 803 may apply the loop filter to animage to which one or more of the deblocking filter and the SAO has beenapplied.

Here, as an example of the loop filter, the ALF illustrated in FIG. 6may be used, and in addition to the ALF, a loop filter widely known inthe existing video codec may also be used.

Here, as an example of the loop filter, the ALF illustrated in FIG. 6may be used, and in addition to the ALF, a loop filter widely known inthe existing video codec may also be used.

The reconstructed image generating unit 804 may apply the weight value1−w to the image before the loop filter is applied and the weight valuew to the image after the loop filter is applied on the basis of theweighting parameter derived from the entropy-decoding unit 801 and addthem to generate a reconstructed image. That is, the reconstructed imagegenerating unit 804 may generate the reconstructed image using Equation3 above.

The reference image generating unit 805 may apply the weight value w tothe image before the loop filter is applied and the weight value 1−w tothe image after the loop filter is applied on the basis of the weightingparameter induced from the entropy-decoding unit 801 and add them togenerate a reconstructed image. That is, the reference image generatingunit 805 may generate the reference image using Equation 4 above.

Although not shown in FIG. 8, the reconstructed image generated by thereconstructed image generating unit 804 and the reference imagegenerated by the reference image generating unit 805 may be stored inthe DPB.

Hereinafter, a method for determining a weighting parameter in theencoder will be described.

FIG. 9 illustrates an encoding device according to an embodiment of thepresent invention.

Referring to FIG. 9, the encoder may configured as a first adder 910, anALF 920, a second adder 930, a third adder 940, and a DPB 950.

The components of the decoder illustrated in FIG. 9 are merelyillustrative and some of the components of the decoder illustrated inFIG. 9 may be included in other components so as to be implementedtogether, any one component may be separate according to functions so asto be implemented, and any other component not illustrated in FIG. 9 maybe added.

The first adder 910 adds the original image (O_t) of a current time towhich the weight value w has been applied and the original image (O_t+1)of a next time to which the weight value 1−w has been applied, andtransmits the same to the ALF 920.

Here, the original image (or frame) of the next time refers to an image(or frame) as an encoding target in a next turn of the current image (orframe) in an encoding order.

The ALF 920 may consider both the original image (O_t) as a currentencoding target and the original image (O_t+1) to be encoded next time,and calculate a filter minimizing an error with the reconstructed image(R_t) and/or the weight value w. That is, the ALF 920 may determine aweight value minimizing an error between the image generated byperforming the weighted sum of the original image as a current encodingtarget and the original image as a next encoding target on the basis ofa certain weight value and the reconstructed image regarding theoriginal image as the current encoding target.

In detail, as an input for calculating a filter (or a filter factor) inthe ALF 920, the original image (O_t) of the current time, the originalimage (O_t+1) of the next time, and the reconstructed image (O_t+1) towhich the deblocking filter/SAO have been applied are used.

An image calculated by the weight sum of the original image of thecurrent time and the original image of the next time by the first adder910 using the weighting parameter value w which may be transmitted tothe decoder, may finally be used as an input of the ALF 920.

Also, the ALF 920 may calculate a filter minimizing an error between theimage calculated as the weight sum of the original image of the currenttime and the original image of the next time and the reconstructed image(R_t), and determine w.

That is, the ALF 920 may calculate an error between the image calculatedas the weight sum of the original image of the current time and theoriginal image of the next time using every available w and thereconstructed image (R_t) and determine a filter and w minimizing theerror.

This may be expressed by Equation 5 below.

$\begin{matrix}{E = {\sum\limits_{x,y}\left( {\left( {{w \times {O_{t}\left( {x,y} \right)}} + {\left( {1 - w} \right) \times {O_{t + 1}\left( {x,y} \right)}}} \right) - \left. \quad{\sum\limits_{i,{j = {{{- M}/2} - 1}}}^{M/2}\left( {{f\left( {i,j} \right)} \times {R_{t}\left( {{x + i},{y + j}} \right)}} \right)} \right)^{2}} \right.}} & \left\lbrack {{Equation}\mspace{14mu} 5} \right\rbrack\end{matrix}$

In Equation 5, O_t indicates the original image of the current time,O_t+1 indicates the original image of the next time, and R_t indicatesthe reconstructed image obtained using the predicted signal and theresidual signal. Also, (x, y) indicates a horizontal coordinate and avertical coordinate of a pixel, and M indicates a size of a filter.

The second adder 930 may generate a reference image by adding the imagebefore the w-applied loop filter is applied and the image after the1−w-applied loop filter is applied.

The third adder 940 may generate a reconstructed image by adding theimage before the 1−w-applied loop filter is applied and the image afterthe w-applied loop filter is applied.

The DPB 950 may store the reference image generated by the second adder930 and the reconstructed image generated by the third adder 940.

The embodiments described so far are those of the elements and technicalfeatures being coupled in a predetermined form. So far as there is notany apparent mention, each of the elements and technical features shouldbe considered to be selective. Each of the elements and technicalfeatures may be embodied without being coupled with other elements ortechnical features. In addition, it is also possible to construct theembodiments of the present invention by coupling a part of the elementsand/or technical features. The order of operations described in theembodiments of the present invention may be changed. A part of elementsor technical features in an embodiment may be included in anotherembodiment, or may be replaced by the elements and technical featuresthat correspond to other embodiment. It is apparent to constructembodiment by combining claims that do not have explicit referencerelation in the following claims, or to include the claims in a newclaim set by an amendment after application

The embodiments of the present invention may be implemented by variousmeans, for example, hardware, firmware, software and the combinationthereof. In the case of the hardware, an embodiment of the presentinvention may be implemented by one or more application specificintegrated circuits (ASICs), digital signal processors (DSPs), digitalsignal processing devices (DSPDs), programmable logic devices (PLDs),field programmable gate arrays (FPGAs), a processor, a controller, amicro controller, a micro processor, and the like

In the case of the implementation by the firmware or the software, anembodiment of the present invention may be implemented in a form such asa module, a procedure, a function, and so on that performs the functionsor operations described so far. Software codes may be stored in thememory, and driven by the processor. The memory may be located interioror exterior to the processor, and may exchange data with the processorwith various known means

It will be understood to those skilled in the art that variousmodifications and variations can be made without departing from theessential features of the inventions. Therefore, the detaileddescription is not limited to the embodiments described above, butshould be considered as examples. The scope of the present inventionshould be determined by reasonable interpretation of the attachedclaims, and all modification within the scope of equivalence should beincluded in the scope of the present invention

INDUSTRIAL AVAILABILITY

So far, the preferred embodiments of the present invention describedabove are disclosed as examples, and may be modified, changed,substituted or added by other various embodiments within the inventiveconcept and scope of the present invention described in the enclosedclaims below by those skilled person in the art.

1. A method for decoding an image, the method comprising: parsing aweight value (w) of a loop filter from a bit stream output from anencoder; applying the loop filter to an image obtained using a predictedsignal and a residual signal; and generating one or more of areconstructed image and a reference image by performing the weighted sumof an image before the loop filter is applied and an image after theloop filter is applied, on the basis of the w.
 2. The method of claim 1,wherein the reconstructed image is generated by adding an image beforethe 1−w-applied loop filter is applied and an image after the w-appliedloop filter is applied.
 3. The method of claim 1, wherein thereconstructed image is generated by adding an image before the w-appliedloop filter is applied and an image after the 1−w-applied loop filter isapplied.
 4. The method of claim 1, further comprising: parsing a flagindicating whether the w is used from the bit stream, wherein when it isindicated by the flag that w is used, one or more of the reconstructedimage and the reference image are generated on the basis of the w. 5.The method of claim 4, wherein when it is indicated by the flag that thew is not used, loop filtering is performed respectively to generate thereconstructed image and the reference image.
 6. The method of claim 1,wherein when a predetermined image is referred to by M number of images,only M−1 number of weight values regarding M−1 number of images amongthe M number of images are transmitted through the bit stream, and aweight value regarding an image for which a weight was not transmitted,among the M number of images, is determined on the basis of the M−1number of weight values.
 7. The method of claim 1, wherein the loopfilter is applied after one or more of a deblocking filter and a sampleadaptive offset (SAO) are applied to an image obtained using thepredicted signal and the residual signal.
 8. The method of claim 1,wherein the w is determined as a weight value minimizing an errorbetween an image generated by performing the weighted sum of an originalimage as a current encoding target and an original image as a nextencoding target on the basis of a certain weight value and areconstructed image regarding the original image as the current encodingtarget.
 9. A device for decoding an image, the device comprising: anentropy-decoding unit parsing a weight value (w) of a loop filter from abit stream output from an encoder; a filtering applying unit applyingthe loop filter to an image obtained using a predicted signal and aresidual signal; and a reconstructed image and reference imagegenerating unit generating one or more of a reconstructed image and areference image by performing the weighted sum of an image before theloop filter is applied and an image after the loop filter is applied, onthe basis of the w.